Skip to content

Add checks for reST content#273

Merged
mfisher87 merged 5 commits intomainfrom
add-rst-checking
Jan 3, 2025
Merged

Add checks for reST content#273
mfisher87 merged 5 commits intomainfrom
add-rst-checking

Conversation

@mfisher87
Copy link
Member

@mfisher87 mfisher87 commented Dec 26, 2024

Resolves #272

@mfisher87 mfisher87 changed the title Add pre-commit check of reST content [WIP] Add pre-commit check of reST content Dec 26, 2024
@github-actions
Copy link
Contributor

Binder 👈 Launch a Binder on branch geojupyter/jupytergis/add-rst-checking

@mfisher87 mfisher87 changed the title [WIP] Add pre-commit check of reST content [WIP] Add checks for reST content Dec 26, 2024
@github-actions
Copy link
Contributor

github-actions bot commented Dec 26, 2024

Preview using JupyterLite: appsharing.space

@github-actions
Copy link
Contributor

github-actions bot commented Dec 26, 2024

Integration tests report: appsharing.space

@github-actions
Copy link
Contributor

github-actions bot commented Dec 26, 2024

Docs preview: appsharing.space

@mfisher87 mfisher87 added documentation Improvements or additions to documentation maintenance Fixing lint errors, changing project metadata, changing tooling, changing dependencies, etc. labels Dec 26, 2024
@mfisher87 mfisher87 marked this pull request as ready for review December 26, 2024 16:52
@mfisher87 mfisher87 changed the title [WIP] Add checks for reST content Add checks for reST content Dec 26, 2024
Copy link
Collaborator

@brichet brichet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks @mfisher87 for working on it.

rev: v6.2.4
hooks:
- id: rstcheck
args: ['--config', '.rstcheck.cfg']
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if we should use the command line arguments instead of the config file (there are not too much of it), to avoid adding a new file.

Copy link
Member Author

@mfisher87 mfisher87 Jan 2, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have no strong feelings on this :)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mfisher87 mfisher87 requested a review from brichet January 2, 2025 16:48
rstcheck doesn't have awareness of sphinx-specific directives or
extensions.
* Redundant reference "contributing" matches the title of the document.
* Change duplicate references named "yarn" to anonymous references.
* Fix code block by adding blank line after directive line.
Copy link
Collaborator

@brichet brichet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @mfisher87, looks good.

Do you know if there is some automation to run this pre-commit ? I can't find it used anywhere.

@mfisher87
Copy link
Member Author

mfisher87 commented Jan 3, 2025

Thanks for the review!

We have pre-commit.ci set up to automate running all pre-commit checks! Here's the run for this PR: https://results.pre-commit.ci/run/github/813604742/1735900723.ZeFeTlxaTOiOWo3rDeXn3Q

@mfisher87 mfisher87 merged commit fab1a41 into main Jan 3, 2025
10 checks passed
@mfisher87 mfisher87 deleted the add-rst-checking branch January 3, 2025 16:12
HaudinFlorence pushed a commit to HaudinFlorence/jupytergis that referenced this pull request Jan 28, 2026
* Add pre-commit check of RST content

* Ignore unsupported sphinx directives in rstcheck config file

rstcheck doesn't have awareness of sphinx-specific directives or
extensions.

* Fix rstcheck errors

* Redundant reference "contributing" matches the title of the document.
* Change duplicate references named "yarn" to anonymous references.
* Fix code block by adding blank line after directive line.

* Move rstcheck config into pre-commit config

---------

Co-authored-by: Nicolas Brichet <32258950+brichet@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation maintenance Fixing lint errors, changing project metadata, changing tooling, changing dependencies, etc.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

reST contains errors

2 participants